var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(mode, type, selection) {
    cm.npc_LeaveField("oid=11111");
    cm.npc_LeaveField("oid=11112");
    cm.npc_LeaveField("oid=11113");
    cm.npc_LeaveField("oid=11114");
    cm.npc_LeaveField("oid=11115");
    var reactor = "action" + (cm.getMapId() - 800024200);
    eval(reactor)(mode, type, selection)
}

function action0(f, d, c) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = c;
    var b = -1;
    if (status <= b++) {
        cm.dispose()
    } else {
        if (status === b++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.sendNormalTalk("叔叔你只要在你认识的人中找出略有差异的对象即可！", 5, 9111018, false, true);
            cm.curNodeEventEnd(true)
        } else {
            if (status === b++) {
                cm.eventSKill(0);
                cm.setInGameDirectionMode(false, true, false);
                var a = cm.rand(9111040, 9111049);
                var e = cm.rand(1, 5);
                cm.npc_ChangeController(e == 1 ? a + 10 : a, "oid=11111", 125, -53, 12, 75, 175, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11111", "summon", 0, 0);
                cm.npc_ChangeController(e == 2 ? a + 10 : a, "oid=11112", 275, -53, 22, 225, 325, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11112", "summon", 0, 0);
                cm.npc_ChangeController(e == 3 ? a + 10 : a, "oid=11113", 425, -53, 18, 375, 475, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11113", "summon", 0, 0);
                cm.npc_ChangeController(e == 4 ? a + 10 : a, "oid=11114", 575, -53, 17, 525, 625, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11114", "summon", 0, 0);
                cm.npc_ChangeController(e == 5 ? a + 10 : a, "oid=11115", 725, -53, 15, 675, 775, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11115", "summon", 0, 0);
                cm.dispose()
            }
        }
    }
}

function action20(f, d, c) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = c;
    var b = -1;
    if (status <= b++) {
        cm.dispose()
    } else {
        if (status === b++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.sendNormalTalk("叔叔你只要在你认识的人中找出略有差异的对象即可！", 5, 9111018, false, true);
            cm.curNodeEventEnd(true)
        } else {
            if (status === b++) {
                cm.eventSKill(0);
                cm.setInGameDirectionMode(false, true, false);
                var a = cm.rand(9111040, 9111049);
                var e = cm.rand(1, 5);
                cm.npc_ChangeController(e == 1 ? a + 10 : a, "oid=11111", 125, -53, 12, 75, 175, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11111", "summon", 0, 0);
                cm.npc_ChangeController(e == 2 ? a + 10 : a, "oid=11112", 275, -53, 22, 225, 325, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11112", "summon", 0, 0);
                cm.npc_ChangeController(e == 3 ? a + 10 : a, "oid=11113", 425, -53, 18, 375, 475, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11113", "summon", 0, 0);
                cm.npc_ChangeController(e == 4 ? a + 10 : a, "oid=11114", 575, -53, 17, 525, 625, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11114", "summon", 0, 0);
                cm.npc_ChangeController(e == 5 ? a + 10 : a, "oid=11115", 725, -53, 15, 675, 775, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11115", "summon", 0, 0);
                cm.dispose()
            }
        }
    }
}

function action40(f, g, j) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = j;
    var c = -1;
    if (status <= c++) {
        cm.dispose()
    } else {
        if (status === c++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.sendNormalTalk("那现在正式开始咯。", 5, 9111018, false, true);
            cm.curNodeEventEnd(true)
        } else {
            if (status === c++) {
                cm.eventSKill(0);
                cm.setInGameDirectionMode(false, true, false);
                var a = cm.rand(1, 5);
                var b = 9111040,
                    h = 9111049,
                    e = 5;
                var d = cm.randArray(b, h, e);
                cm.npc_ChangeController(a == 1 ? d[0] + 10 : d[0], "oid=11111", -25, -53, 13, -75, 25, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11111", "summon", 0, 0);
                cm.npc_ChangeController(a == 2 ? d[1] + 10 : d[1], "oid=11112", 125, -53, 12, 75, 175, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11112", "summon", 0, 0);
                cm.npc_ChangeController(a == 3 ? d[2] + 10 : d[2], "oid=11113", 275, -53, 22, 225, 325, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11113", "summon", 0, 0);
                cm.npc_ChangeController(a == 4 ? d[3] + 10 : d[3], "oid=11114", 425, -53, 18, 375, 475, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11114", "summon", 0, 0);
                cm.npc_ChangeController(a == 5 ? d[4] + 10 : d[4], "oid=11115", 575, -53, 17, 525, 625, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11115", "summon", 0, 0);
                cm.dispose()
            }
        }
    }
}

function action60(f, g, j) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = j;
    var c = -1;
    if (status <= c++) {
        cm.dispose()
    } else {
        if (status === c++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.sendNormalTalk("叔叔你只要在你认识的人中找出略有差异的对象即可！", 5, 9111018, false, true);
            cm.curNodeEventEnd(true)
        } else {
            if (status === c++) {
                cm.eventSKill(0);
                cm.setInGameDirectionMode(false, true, false);
                var a = cm.rand(1, 5);
                var b = 9111040,
                    h = 9111049,
                    e = 5;
                var d = cm.randArray(b, h, e);
                cm.npc_ChangeController(a == 1 ? d[0] + 10 : d[0], "oid=11111", -25, -53, 13, -75, 25, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11111", "summon", 0, 0);
                cm.npc_ChangeController(a == 2 ? d[1] + 10 : d[1], "oid=11112", 125, -53, 12, 75, 175, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11112", "summon", 0, 0);
                cm.npc_ChangeController(a == 3 ? d[2] + 10 : d[2], "oid=11113", 275, -53, 22, 225, 325, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11113", "summon", 0, 0);
                cm.npc_ChangeController(a == 4 ? d[3] + 10 : d[3], "oid=11114", 425, -53, 18, 375, 475, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11114", "summon", 0, 0);
                cm.npc_ChangeController(a == 5 ? d[4] + 10 : d[4], "oid=11115", 575, -53, 17, 525, 625, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11115", "summon", 0, 0);
                cm.dispose()
            }
        }
    }
}

function action80(f, g, j) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = j;
    var c = -1;
    if (status <= c++) {
        cm.dispose()
    } else {
        if (status === c++) {
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.sendNormalTalk("叔叔你只要在你认识的人中找出略有差异的对象即可！", 5, 9111018, false, true);
            cm.curNodeEventEnd(true)
        } else {
            if (status === c++) {
                cm.eventSKill(0);
                cm.setInGameDirectionMode(false, true, false);
                var a = cm.rand(1, 5);
                var b = 9111040,
                    h = 9111049,
                    e = 5;
                var d = cm.randArray(b, h, e);
                cm.npc_ChangeController(a == 1 ? d[0] + 10 : d[0], "oid=11111", -25, -53, 13, -75, 25, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11111", "summon", 0, 0);
                cm.npc_ChangeController(a == 2 ? d[1] + 10 : d[1], "oid=11112", 125, -53, 12, 75, 175, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11112", "summon", 0, 0);
                cm.npc_ChangeController(a == 3 ? d[2] + 10 : d[2], "oid=11113", 275, -53, 22, 225, 325, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11113", "summon", 0, 0);
                cm.npc_ChangeController(a == 4 ? d[3] + 10 : d[3], "oid=11114", 425, -53, 18, 375, 475, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11114", "summon", 0, 0);
                cm.npc_ChangeController(a == 5 ? d[4] + 10 : d[4], "oid=11115", 575, -53, 17, 525, 625, 1, false, 0, false);
                cm.npc_SetSpecialAction("oid=11115", "summon", 0, 0);
                cm.dispose()
            }
        }
    }
};